type User = {
	id: number,
	kind: string
}

/*
* 使用 as 类型断言
* */
function makeCustomer<T extends User> (u:T):T {
	return {
		id: u.id,
		kind: 'customer'
	} as T
}
